package org.dtrd.modules.organization.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.dtrd.modules.organization.entity.bean.OrganizationDetail;
import org.dtrd.modules.organization.entity.bean.OrganizationListInfo;
import org.dtrd.modules.organization.entity.po.DtrdEntRdOrganization;
import org.dtrd.modules.organization.entity.request.OrganizationPageRequest;

import java.util.List;

/**
 * <p>
 * 机构表服务类
 * </p>
 *
 * @author QR
 * @since 2021-12-14
 */
public interface IDtrdEntRdOrganizationService extends IService<DtrdEntRdOrganization> {

    List<OrganizationListInfo> getOrganizationList(Integer packageId);

    IPage<OrganizationListInfo> pageOrganization(OrganizationPageRequest request);

    OrganizationDetail getOrganization(Integer dataId, String orgCode);

    /**
     * 通过 orgCode 获取 机构名字
     */
    String getOrgName(String orgCode);

    boolean saveOrUpdateOrganization(OrganizationDetail dto);

    boolean removeOrganization(Integer dataId);
}
